        <%@ page import="javax.naming.Context" %>
<%@ page import="javax.naming.InitialContext" %>
<%@ page import="javax.sql.DataSource" %>
<%@ page import="java.sql.Connection" %>
<%@ page import="java.sql.PreparedStatement" %>
<%--
  User: HP
  Date: 09.10.13
  Time: 8:06
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title></title>
</head>
<body>
<%
    String email = null;
    Connection conn = null;
    try {
        email = request.getParameter("email");
        String token = request.getParameter("token");
        Context ctx = new InitialContext();
        DataSource ds = null;
        ds = (DataSource) ctx.lookup("jdbc/security");
        conn = ds.getConnection();
        PreparedStatement ps = conn.prepareStatement("UPDATE ORDERS SET CONFIRMED = 1 WHERE CONFIRMATION_TOKEN = ?");
        ps.setString(1, token);
        ps.execute();
    } catch (Exception e) {
        out.print("Something went wrong. Try again.");
    } finally {
        conn.close();
    }
%>

Thanks you for order confirmation.</h3>
<p/><a href="login.jsp">login</a>
</div>

</body>
</html>